//
//  SLMP4Parser+Udta.m
//  SLVideoParser
//
//  Created by S_LINE on 2020/6/20.
//  Copyright © 2020 S_LINE. All rights reserved.
//

#import "SLMP4Parser+Udta.h"

#import "SLParserUtil.h"

@implementation SLMP4Parser (Udta)

- (NSDictionary *)metaParser:(NSData *)data
{
    
    if (data.length < 1)
    {
        return nil;
    }
    NSString *versionKey = @"version";
    NSMutableDictionary *dict = [NSMutableDictionary new];
    NSData *versionData = [data subdataWithRange:NSMakeRange(0, 1)];
    uint64_t version = [SLParserUtil hexToDecimalWithData:versionData];
    [dict setObject:[NSNumber numberWithUnsignedLongLong:version] forKey:versionKey];
    
    if (version == 0)
    {
    }
    
    return [dict copy];
}

@end
